Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add timestamps to /status/:cid response #89

Merged
merged 4 commits into from
Jul 15, 2021
Merged

Conversation

olizilla
Copy link
Contributor

@olizilla olizilla commented Jul 14, 2021

  • add created denoting when we first saw this content
  • add pins.updated for when the pin status last changed
  • add deals.created and deals.updated to the filecoin deal status
  • updated tests and docs
  • fix 404 logic

fixes #78 (comment)

Example status response

{
  "cid": "testcid",
  "created": "2021-07-14T19:27:14.934572Z",
  "dagSize": 101,
  "pins": [{
    "peerId": "12D3KooWR1Js",
    "peerName": "who?",
    "region": "where?",
    "status": "Pinned",
    "created": "2021-07-14T19:27:14.934572Z",
  }],
  "deals": [{
    "dealId": 12345,
    "miner": "f99",
    "status": "Active",
    "pieceCid": "baga",
    "dataCid": "bafy",
    "dataModelSelector": "Links/0/Links",
    "activation": "<iso timestamp>",
    "created": "2021-07-14T19:27:14.934572Z",
    "updated": "2021-07-14T19:27:14.934572Z"
  }]
}

License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans [email protected]

olizilla added 3 commits July 14, 2021 21:30
- add `created` denoting when we first saw this content
- add `pins.updated` for when the pin status last changed
- add `deals.created` and `deals.updated` to the filecoin deal status
- updated test
- fix 404 logic

License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans <[email protected]>
License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans <[email protected]>
License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans <[email protected]>
License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans <[email protected]>
@alanshaw alanshaw merged commit 3526451 into main Jul 15, 2021
@alanshaw alanshaw deleted the status-timestamps branch July 15, 2021 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add status endpoint to check pin and deal info per cid
2 participants